<template>
    <view>
        <view class="listbox">
            <view :class="'dl' + ((idx % 6 == 0 && idx > 0) || U.length == idx + 1 ? ' dl0' : '')" v-for="(item, idx) in U" :key="idx">
                <view class="dt">{{ item.T }}</view>

                <view class="dd">
                    <image class="ugrade2" mode="aspectFill" :src="item.grade_ico" v-if="item.T == '用户等级'"></image>
                    {{ item.V }}
                    <text @tap.stop.prevent="copyuidFn" class="ico icon-copyuid" :data-uid="uid" v-if="item.T == 'ID'"></text>
                </view>
            </view>
        </view>
        <view class="blank"></view>
    </view>
</template>

<script>
var o = require('../../res/www.a9a.cn.js');
var app = getApp();
export default {
    data() {
        return {
            uid: '',
            color: '',
            rgbcolor: '',
            U: ''
        };
    },
    onLoad: function (t) {
        var that = this;
        this.setData({
            uid: t.uid,
            color: app.globalData._ZEAI.color,
            rgbcolor: o.c16_rgb(app.globalData._ZEAI.color)
        });
        var e = uni.getStorageSync('COOK_U');
        uni.request({
            url: app.globalData.WWW + '/api/wxxcx/u.php',
            data: {
                submitok: 'data_more',
                uid: t.uid,
                openid: e.openid
            },
            success: function (n) {
                if (1 == (n = o.jsoneval(n.data)).flag) {
                    var t = n.nickname;
                    that.setData({
                        U: n.U
                    });
                } else {
                    uni.showModal({
                        content: n.msg,
                        confirmColor: that.color,
                        confirmText: '朕知道了',
                        showCancel: false,
                        success: function (o) {
                            uni.navigateBack();
                        }
                    });
                }
                uni.setNavigationBarTitle({
                    title: t + '的详细资料'
                });
            }
        });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {},
    methods: {
        copyuidFn: function (n) {
            var t = n.currentTarget.dataset.uid;
            o.copy_text({
                data: t,
                msg: 'ID编号复制成功'
            });
        }
    }
};
</script>
<style>
@import 'data_more.css';
</style>
